﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/Site.master" AutoEventWireup="true" CodeFile="TimKiem.aspx.cs" Inherits="Pages_TimKiem" %>

<%--<%@ Register src="../UControls/UCThucDonTheoNhom.ascx" tagname="UCThucDonTheoNhom" tagprefix="uc1" %>--%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">


<asp:ListView ID="lvwTimKiem" runat="server" DataSourceID="EntityDataSource1" 
    GroupItemCount="3" DataKeyNames="SanPhamID">
    
    <GroupTemplate>
        <tr ID="itemPlaceholderContainer" runat="server">
            <td ID="itemPlaceholder" runat="server">
            </td>
        </tr>
    </GroupTemplate>
    
    <ItemTemplate>
        <td id="Td1" runat="server" style="border:1px dotted #444444;" align="center">
            <asp:Image ID="hinh" runat="server"
               ImageUrl='<%# "~/Photos/SanPham/"+Eval("Hinh") %>' Width="230px" /><br />
             <asp:HyperLink ID="tenThucDon" runat="server" Text='<%# Eval("TenSanPham") %>' 
            NavigateUrl='<%# "~/Pages/SanPhamCT.aspx?idSP="+Eval("SanPhamID") %>' 
                CssClass="LinkSanPham"></asp:HyperLink>
           <div class="alignR" style="padding: 5px 10px;">
            <asp:ImageButton ID="chonMua" runat="server" CommandName="chonMua"
             CommandArgument='<%# Eval("SanPhamID") %>' ToolTip="Chon mua hang" ImageAlign="Left" ImageUrl="~/Images/cart.png" Width="32px" Height="28px" />
            Don gia:
            <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
            </div>
        </td>
    </ItemTemplate>
    <LayoutTemplate>
        <table id="Table1" runat="server" style="width:100%">
            <tr id="Tr1" runat="server">
                <td id="Td2" runat="server">
                    <table ID="groupPlaceholderContainer" runat="server" border="0" style="width:100%;">
                        <tr ID="groupPlaceholder" runat="server">
                        </tr>
                    </table>
                </td>
            </tr>
            <tr id="Tr2" runat="server">
                <td id="Td3" runat="server" style="" align="center">
                    <asp:DataPager ID="DataPager1" runat="server" PageSize="9">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Image" ShowFirstPageButton="True" 
                                ShowNextPageButton="False" ShowPreviousPageButton="False" NextPageImageUrl="~/Images/MoveFirst.png" />
                            <asp:NumericPagerField />
                            <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                ShowNextPageButton="False" ShowPreviousPageButton="False" />
                        </Fields>
                    </asp:DataPager>
                </td>
            </tr>
        </table>
    </LayoutTemplate>
    
</asp:ListView>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
    ConnectionString="name=EDiamondEntities1" 
    DefaultContainerName="EDiamondEntities1" EnableFlattening="False" 
    EntitySetName="SanPhams" 
    OrderBy="" Where="it.BiDanh like '%' + @Sanpham + '%'">
    <WhereParameters>
        <asp:QueryStringParameter Name="Sanpham" QueryStringField="TenSanPham" 
            Type="Object" />
    </WhereParameters>
</asp:EntityDataSource>
 
 


    
</asp:Content>

